home *** CD-ROM | disk | FTP | other *** search
- //
- // The Fusion Library Interface for DOS
- // Version 1.06c
- // Copyright (C) 1990, 1991, 1992
- // Software Dimensions
- //
- // BlazeClass
- //
-
- #ifndef __BCPLUSPLUS__
- #pragma inline
- #endif
-
- #include "fli.h"
-
- #ifdef __BCPLUSPLUS__
- #pragma hdrstop
- #endif
-
- #define I asm
-
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- //
- // EraseArea()
- //
- // Erases a region of the display to a certain color
- //
- //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- void BlazeClass::EraseArea(int X,int Y,int Width,int Height,int Color)
- {
- if (!Width || !Height || X>=WinWide || Y>=WinHigh)
- return;
-
- int ScreenWidth = BlazeClass::QuickWidth;
- int Locator = ((WinY+Y)*ScreenWidth)+((WinX+X)*2);
-
- if (X+Width>=WinWide)
- Width=WinWide-X;
-
- if (Y+Height>=WinHigh)
- Height=WinHigh-Y;
-
- void far *OUTPUT=BlazeClass::OUTPUT;
- I les di,OUTPUT
- I add di,Locator
-
- I mov bx,[Width]
- I mov dx,[Height]
-
- I cld
-
- I mov ah,byte ptr Color
- I mov al,32
-
- looped:
-
- I push di
- I mov cx,bx
- I rep stosw
- I pop di
- I add di,ScreenWidth
- I dec dx
- I or dx,dx
- I jne looped
- }
-